package com.xls.box2023.entity;

import android.text.TextUtils;

import com.lzz.bottomencapsulation.consts.Consts;

import java.io.Serializable;
import java.util.ArrayList;

import androidx.annotation.Nullable;

public class


AppTeamUsersEntity implements Serializable {

    /**
     * username : string
     * unionId : string
     * scoreTotal : 0
     * score : 0
     * appId : string
     */

    private String username;
    private String unionId;
    private String scoreTotal;
//    private String score;
    private String appId;

    private boolean isopen;

    public boolean isIsopen() {
        return isopen;
    }

    public void setIsopen(boolean isopen) {
        this.isopen = isopen;
    }

    ArrayList<AppTeamUsersEntity> datas;

    public AppTeamUsersEntity(String unionId) {
        this.unionId = unionId;
    }

    public ArrayList<AppTeamUsersEntity> getList() {
        return datas;
    }

    public void setList(ArrayList<AppTeamUsersEntity> list) {
        this.datas = list;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUnionId() {
        return unionId;
    }

    public void setUnionId(String unionId) {
        this.unionId = unionId;
    }

    public String getScoreTotal() {
        return scoreTotal;
    }

    public String getScoreTotalStr() {
        if (TextUtils.isEmpty(scoreTotal))return "0";
        Long s=Long.parseLong(scoreTotal);
        return s/ Consts.JiFenDanWei+"";
    }

    public void setScoreTotal(String scoreTotal) {
        this.scoreTotal = scoreTotal;
    }

//    public String getScore() {
//        return score;
//    }

//    public void setScore(String score) {
//        this.score = score;
//    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    @Override
    public boolean equals(@Nullable Object obj) {
        if (obj instanceof AppTeamUsersEntity){
            return ((AppTeamUsersEntity) obj).unionId.equals(this.unionId);
        }
        return false;
    }

    private String dayUserTotal;//注册用户
    private String dayUserActTotal;//日活用户
    private String dayptUserScoreTotal;//推广积分

    public String getDayUserTotal() {
        if (TextUtils.isEmpty(dayUserTotal))return "0";
        return dayUserTotal;
    }

    public void setDayUserTotal(String dayUserTotal) {
        this.dayUserTotal = dayUserTotal;
    }

    public String getDayUserActTotal() {
        if (TextUtils.isEmpty(dayUserActTotal))return "0";
        return dayUserActTotal;
    }

    public void setDayUserActTotal(String dayUserActTotal) {
        this.dayUserActTotal = dayUserActTotal;
    }

    public String getDayptUserScoreTotal() {
        if (TextUtils.isEmpty(dayptUserScoreTotal))return "0";
        Long s=Long.parseLong(dayptUserScoreTotal);
        return s/ Consts.JiFenDanWei+"";
    }

    public void setDayptUserScoreTotal(String dayptUserScoreTotal) {
        this.dayptUserScoreTotal = dayptUserScoreTotal;
    }
}
